<?
require_once("lib/php/Json.php");
require_once("ericdingle/php/AuthRpcController.php");
require_once("ericdingle/model/label/LabelProvider.php");

class CreateLabel extends AuthRpcController {
	public function doPost() {
		list($name) = $this->getArguments(1);

		$label = new LabelEntity(null, $name);
		$labelProvider = LabelProvider::getInstance();
		$labelProvider->create($label);
		
		$this->printExpireHeader();
		echo Json::toJson($label->getLabelID());
	}
}
?>
